#include "PerformanceTimer.h"

#ifdef WIN32

PerformanceTimer::PerformanceTimer()
{
	QueryPerformanceFrequency(&m_timerFreq);
	QueryPerformanceCounter(&m_timeBegin);
}

PerformanceTimer::~PerformanceTimer()
{
}

void PerformanceTimer::Tick()
{
	LARGE_INTEGER time;
	QueryPerformanceCounter(&time);

	double t = double(time.QuadPart - m_timeBegin.QuadPart)/(m_timerFreq.QuadPart);

	m_time.setTime((float)(int(t*1000.0f)));
}

#endif